#include "vc1dec_definitions.h"
#include "vc1vlc.h"

const VC1_sBFraction VC1_Bfractions[23] = 
{
	{ 1, 2, 128 },
    { 1, 3,  85 },
    { 2, 3, 170 },
    { 1, 4,  64 },
    { 3, 4, 192 },
    { 1, 5,  51 },
    { 2, 5, 102 },
    { 3, 5, 153 },
    { 4, 5, 204 },
    { 1, 6,  43 },
    { 5, 6, 215 },
    { 1, 7,  37 },
    { 2, 7,  74 },
    { 3, 7, 111 },
    { 4, 7, 148 },
    { 5, 7, 185 },
    { 6, 7, 222 },
    { 1, 8,  32 },
    { 3, 8,  96 },
    { 5, 8, 160 },
    { 7, 8, 224 },
    { 1, 0,   0 },
    { 2, 0,   0 }
};

const U8_VC1 VC1ImplicitQuantizer[32] =
{
     0,  0,  0,  0,  0,  0,  0,  0,
     0,  6,  7,  8,  9, 10, 11, 12,
    13, 14, 15, 16, 17, 18, 19, 20,
    21, 22, 23, 24, 25, 27, 29, 31
};

const VC1_eMVMode VC1PLOWRATEMVMODE[5] = 
{
	VC1_MVMode1MVHalfPelBilinear,
	VC1_MVMode1MV,
	VC1_MVMode1MVHalfPel,
	VC1_MVModeMixedMV,
	VC1_MVModeIntensityCompensation
};

const VC1_eMVMode VC1PHIGHRATEMVMODE[5] = 
{
	VC1_MVMode1MV,
	VC1_MVModeMixedMV,
	VC1_MVMode1MVHalfPel,
	VC1_MVMode1MVHalfPelBilinear,
	VC1_MVModeIntensityCompensation
};

const sVC1VLCCode VC1ICBPYTableSM[65] = 
{
	{64,    0},
	{1,     1}, 
	{23,    6}, 
	{9,     5}, 
	{5,     5}, 
	{6,     5}, 
	{71,    9}, 
	{32,    7}, 
	{16,    7}, 
	{2,     5}, 
	{124,   9},
	{58,    7}, 
	{29,    7}, 
	{2,     6}, 
	{236,   9}, 
	{119,   8}, 
	{0,     8}, 
	{3,     5}, 
	{183,   9}, 
	{44,    7}, 
	{19,    7}, 
	{1,     6}, 
	{360,  10}, 
	{70,    8}, 
	{63,    8}, 
	{30,    6},
	{1810, 13}, 
	{181,   9}, 
	{66,    8}, 
	{34,    7}, 
	{453,  11}, 
	{286,  10}, 
	{135,   9}, 
	{6,     4}, 
	{3,     9}, 
	{30,    7}, 
	{28,    6}, 
	{18,    7}, 
	{904,  12}, 
	{68,    9}, 
	{112,   9}, 
	{31,    6}, 
	{574,  11}, 
	{57,    8}, 
	{142,   9}, 
	{1,     7}, 
	{454,  11}, 
	{182,   9}, 
	{69,    9}, 
	{20,    6}, 
	{575,  11}, 
	{125,   9}, 
	{24,    9}, 
	{7,     7}, 
	{455,  11}, 
	{134,   9}, 
	{25,    9}, 
	{21,    6}, 
	{475,  10}, 
	{2,     9}, 
	{70,    9}, 
	{13,    8}, 
	{1811, 13}, 
	{474,  10}, 
	{361,  10}, 
};

const sVC1VLCCode VC1PBCBPYTable1SM[65] =
{
	{64,    0},
	{0,    13}, 
	{6,    13}, 
	{15,    7}, 
	{13,   13}, 
	{13,   17}, 
	{11,   13}, 
	{3,    13}, 
	{13,   12}, 
	{5,     6}, 
	{8,    13},
	{49,    7}, 
	{10,   12}, 
	{12,    6}, 
	{114,   8}, 
	{102,   8}, 
	{119,   8},//15 
	{1,     5}, 
	{54,    7}, 
	{96,    8}, 
	{8,    12}, 
	{10,    6}, 
	{111,   8}, 
	{5,    13}, 
	{15,   12}, 
	{12,    7},
	{10,   13}, //25
	{2,    13}, 
	{12,   12}, 
	{13,    6}, 
	{115,   8}, 
	{53,    7}, //30
	{63,    7}, 
	{1,     6}, 
	{7,    13}, 
	{1,     8}, 
	{7,    12},//35 
	{14,    7}, 
	{12,   13}, 
	{4,    13}, 
	{14,   12}, 
	{1,     7}, //40
	{9,    13}, 
	{97,    8}, 
	{11,   12}, 
	{7,     5}, 
	{58,    7}, //45
	{52,    7}, 
	{62,    7}, 
	{4,     6}, 
	{103,   8}, 
	{1,    13}, //50
	{9,    12}, 
	{11,    6}, 
	{56,    7}, 
	{101,   8}, 
	{118,   8},//55 
	{4,     5}, 
	{110,   8}, 
	{100,   8}, 
	{30,    6}, 
	{2,     3},//60 
	{5,     3}, 
	{4,     3}, 
	{3,     2},
};

//const sVC1VLCCode VC1PBCBPYTable2SM[65] =
//{
//};



